{%TEMPLATE->struct/head%}
{%TEMPLATE->struct/menu%}
<h2>Log Entries</h2>
{%TEMPLATE->struct/messages%}
<div class="card">
  <div class="table-responsive">
    <table class="table table-bordered">
		  <tr>
			  <td colspan="5">
          <form class='form-inline' action="log.php" method="post">
            <input type="hidden" name="show" value="true">
            <select name="level" class="form-control" title="Loglevel">
              <option value="0"{{IF [[level]] == 0}} selected{{ENDIF}}>ALL</option>
              <option value="information"{{IF [[level]] == 'information'}} selected{{ENDIF}}>information</option>
              <option value="warning"{{IF [[level]] == 'warning'}} selected{{ENDIF}}>warning</option>
              <option value="error"{{IF [[level]] == 'error'}} selected{{ENDIF}}>error</option>
              <option value="fatal error"{{IF [[level]] == 'fatal error'}} selected{{ENDIF}}>fatal error</option>
            </select>&nbsp;&nbsp;
            <input type='submit' class='btn {{IF [[toggledarkmode]] > 0}}btn-primary{{ELSE}}btn-light{{ENDIF}}' value='Show'>
          </form>
			  </td>
		  </tr>
		  <tr>
			  <th>Entry ID</th>
			  <th>Time</th>
			  <th>Level</th>
			  <th>Issuer</th>
			  <th>Message</th>
		  </tr>
		  {{FOREACH entry;[[entries]]}}
			  <tr style="background-color: #{{IF [[entry.getLevel()]] == 'information'}}397b39{{ENDIF}}{{IF [[entry.getLevel()]] == 'warning'}}b16a06{{ENDIF}}{{IF [[entry.getLevel()]] == 'error'}}8b0010{{ENDIF}}{{IF [[entry.getLevel()]] == 'fatal error'}}750404{{ENDIF}}">
				  <td>[[entry.getId()]]</td>
				  <td>[[date("d.m.Y - H:i:s", [[entry.getTime()]])]]</td>
				  <td>[[entry.getLevel()]]</td>
				  <td>[[entry.getIssuer()]]-ID[[entry.getIssuerId()]]</td>
          <td>[[entry.getMessage()]]</td>
			  </tr>
		  {{ENDFOREACH}}
	  </table>
  </div>
</div>
{%TEMPLATE->struct/foot%}
